<include file="public@header" />
<link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li ><a href="{:url('admin/Auth/index')}">认证列表</a></li>
			<li class="active"><a >修改认证</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('admin/Auth/editPost')}">


			<div class="form-group">
				<label for="input-username" class="col-sm-2 control-label"><span class="form-required">*</span>姓名</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-username" name="username" maxlength="6" placeholder="6字以内" value="{$data['name']}">
				</div>
			</div>

			<div class="form-group">
				<label for="input-type" class="col-sm-2 control-label"><span class="form-required">*</span>性别</label>
				<div class="col-md-6 col-sm-10">
					<label class="radio-inline"><input type="radio" name="sex" value="1" <if condition="1 eq $data['sex']">checked</if>>男</label>
					<label class="radio-inline"><input type="radio" name="sex" value="2" <if condition="2 eq $data['sex']">checked</if>>女</label>
				</div>
			</div>

			<div class="form-group">
				<label for="input-height" class="col-sm-2 control-label"><span class="form-required">*</span>身高</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-height" name="height"  placeholder="请输入身高cm" value="{$data['height']}">
				</div>
			</div>

			<div class="form-group">
				<label for="input-weight" class="col-sm-2 control-label"><span class="form-required">*</span>体重</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-weight" name="weight"  placeholder="请输入体重kg" value="{$data['weight']}">
				</div>
			</div>

			<div class="form-group">
                <label for="input-family_switch" class="col-sm-2 control-label"><span class="form-required">*</span>星座</label>
                <div class="col-md-6 col-sm-10">
                    <select class="form-control" name="constellation">
                        <option value="白羊座" <eq name="data['constellation']" value="白羊座">selected</eq>>白羊座(3.21-4.19)</option>
                        <option value="金牛座" <eq name="data['constellation']" value="金牛座">selected</eq>>金牛座(4.20-5.20)</option>
                        <option value="双子座" <eq name="data['constellation']" value="双子座">selected</eq>>双子座(5.21-6.21)</option>
                        <option value="巨蟹座" <eq name="data['constellation']" value="巨蟹座">selected</eq>>巨蟹座(6.22-7.22)</option>
                        <option value="狮子座" <eq name="data['constellation']" value="狮子座">selected</eq>>狮子座(7.23-8.22)</option>
                        <option value="处女座" <eq name="data['constellation']" value="处女座">selected</eq>>处女座(8.23-9.22)</option>
                        <option value="天秤座" <eq name="data['constellation']" value="天秤座">selected</eq>>天秤座(9.23-10.23)</option>
                        <option value="天蝎座" <eq name="data['constellation']" value="天蝎座">selected</eq>>天蝎座(10.24-11.22)</option>
                        <option value="射手座" <eq name="data['constellation']" value="射手座">selected</eq>>射手座(11.23-12.21)</option>
                        <option value="摩羯座" <eq name="data['constellation']" value="摩羯座">selected</eq>>摩羯座(12.22-1.19)</option>
                        <option value="水瓶座" <eq name="data['constellation']" value="水瓶座">selected</eq>>水瓶座(1.20-2.18)</option>
                        <option value="双鱼座" <eq name="data['constellation']" value="双鱼座">selected</eq>>双鱼座(2.19-3.20)</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
				<label for="input-label" class="col-sm-2 control-label"><span class="form-required">*</span>形象标签</label>
				<div class="col-md-6 col-sm-10">
					<volist name="label_list" id="vo">
						<label class="checkbox-inline">
							<input type="checkbox" value="{$vo['id']}" name="label[]" <in value="$data['labelid']" name="$vo['id']">checked="checked"</in>>
							<span style="color: {$vo['colour']}">{$vo['name']}</span>
						</label>
					</volist>
					<p class="help-block">至多选3项</p>
				</div>
			</div>

			<div class="form-group">
				<label for="input-intr" class="col-sm-2 control-label"><span class="form-required">*</span>个人介绍</label>
				<div class="col-md-6 col-sm-10">
					<textarea class="form-control" id="input-intr" name="intr" maxlength="40" placeholder="40字以内">{$data['intr']}</textarea> 
				</div>
			</div>

			<div class="form-group">
				<label for="input-signature" class="col-sm-2 control-label"><span class="form-required">*</span>个性签名</label>
				<div class="col-md-6 col-sm-10">
					<textarea class="form-control" id="input-signature" name="signature" maxlength="40" placeholder="40字以内">{$data['signature']}</textarea> 
				</div>
			</div>


			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>所在城市</label>
				<div class="col-md-6 col-sm-10">
                    <div class="layui-form">
				        <div class="layui-form-item" id="receive_area-picker">
				            
				            <div class="layui-input-inline" style="width: 200px;">
				                <select name="province" class="province-selector" data-value="{$data['province']}" lay-filter="province-1">
				                    <option value="">请选择省</option>
				                </select>
				            </div>
				            <div class="layui-input-inline" style="width: 200px;">
				                <select name="city" class="city-selector" data-value="{$data['city']}" lay-filter="city-1">
				                    <option value="">请选择市</option>
				                </select>
				            </div>
				            <div class="layui-input-inline" style="width: 200px;">
				                <select name="district" class="county-selector" data-value="{$data['district']}" lay-filter="county-1">
				                    <option value="">请选择区</option>
				                </select>
				            </div>
				        </div>
				    </div>
				</div>
			</div>

			
            
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="{$data.id}" />
					<input type="hidden" name="uid" value="{$data.uid}" />
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
				</div>
			</div>
            
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script src="__STATIC__/layui/layui.js"></script>
    <script>
        //配置插件目录
        layui.config({
            base: '__STATIC__/mods/'
            , version: '1.0'
        });
        //一般直接写在一个js文件中
        

        layui.use(['layer', 'form', 'layarea'], function () {
            var layer = layui.layer
                , form = layui.form
                , layarea = layui.layarea;

            layarea.render({
                elem: '#receive_area-picker',
                change: function (res) {
                    //选择结果
                    console.log(res);
                }
            });

        });

        
    </script>
	<script>
        (function(){
            $('.btn-cancel-thumbnail').click(function () {
                $('#thumbnail-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
                $('#thumbnail').val('');
            });
            
            $('.btn-cancel-thumbnail2').click(function () {
                $('#thumbnail2-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
                $('#thumbnail2').val('');
            });

            $('.btn-cancel-thumbnail3').click(function () {
                $('#thumbnail3-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
                $('#thumbnail3').val('');
            });
            $('.btn-cancel-thumbnail4').click(function () {
                $('#thumbnail4-preview').attr('src', '__TMPL__/public/assets/images/default-thumbnail.png');
                $('#thumbnail4').val('');
            });
        })()
    </script>
</body>
</html>